
<include file="./Tpl/default/Index/header.html"/>
<css file="__PUBLIC__/index/css/user.css"/>

<script>
    var url = "__URL__";
    $(function(){
        $('.select1').click(function(event){
            // $(this).hide();
            event.stopPropagation();
            $('.sort_check1').show();    
        })
        $('.sort_check1 .type1').click(function(){
                    
            $('.sortid1').attr({name:$(this).attr('name')});
            $('.geitsid').val($(this).attr('name'));
            $('.sortid1').html($(this).html());
            $(this).parent().parent().hide();
                    
        })
        $(document).click(function(){
            $('.sort_check1').hide();
        })
        $('.huabtn').click(function(){
           if($('.sortid1').attr('name')==0){
               alert('请选择类别');
               return false;
           }
            $('.gedit').submit();
        })
        $('.delhuab').click(function(){
            if(!window.confirm('确定要删除这个画板吗？删除后这个画板内的所有采集都会被删除。')){
                return false;
            }
            var kid = $(this).attr('name');
            $.post(url+'/delhua',{'kid':kid},function(data){
                if(data.num==1){
                    location.href=url+'/showuser';
                }
            },'json')
        
        })
    })
</script>
<div class="middle">
    <div class="top">
        <p>帐号设置 / {$data.name}</p>
    </div>
    <form action="{:U('Complete/geithua/kid/'.$data['kid'])}" method="post" class="gedit">
        <input type="hidden" name="sid" class="geitsid" value="{$data.sid}"/>
        <div class="box">
            <div class="tit">
                <table>
                    <tr>
                        <td>标题</td>
                        <td class="int"><input  name="name" type="text" value="{$data.name}" ></td>
                    </tr>
                </table>
            </div>
        </div>
        <div class="box">
            <div class="tit">
                <table>
                    <tr>
                        <td>描述</td>
                        <td class="int"><textarea style="width:400px;height:120px"></textarea></td>
                    </tr>
                </table>
            </div>
        </div>

        <div class="box">
            <div class="tit">
                <table>
                    <tr>
                        <td>分类</td>
                        <td class="int">
                            <div class="select1">
                                <if condition="$data['sid'] eq 0">
                                    <span class="sortid1" name="{$data.sid}">选择类别</span>
                                    <else/>
                                    <span class="sortid1" name="{$data.sid}">{$data.type}</span>
                                </if>
                                <span class="down1"></span>
                            </div>
                            <div class="sort_check1">
                                <ul>
                                    <taglib name="blog"/>  
                                    <blog:sort name="0">
                                        <li class="type" name="{$field.sid}">{$field.type}</li>
                                    </blog:sort>
                                </ul>
                            </div>
                        </td>
                    </tr>
                </table>
            </div>
        </div>

        <div class="box">
            <div class="tit">
                <table>
                    <tr>
                        <td>删除</td>
                        <td class="int">
                            <div class="atten">
                                <a href="javascript::" class="delhuab"  name="{$data.kid}">删除画板</a>
                            </div>
                        </td>
                    </tr>
                </table>
            </div>
        </div>
        <div class=""><a href="javascript:;" class="btn1 huabtn"">保存设置</a></div>
    </form>
</div>
</body>
</html>
